﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ConcreteMappersAndObjects.DomainObjects;

namespace ExaminationTT.View
{
    public class RoomsGridView : System.Windows.Forms.DataGridView
    {
        private DataGridViewTextBoxColumn _description;
        private DataGridViewTextBoxColumn _seats;

        public RoomsGridView()
        {
            _description = new DataGridViewTextBoxColumn();
            _seats = new DataGridViewTextBoxColumn();
            this.AutoGenerateColumns = false;
            _description.Name = "_description";
            _description.HeaderText = "Descrição";
            _description.DataPropertyName = "Description"; 
            
            _description.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            _seats.Name = "_seats";
            _seats.HeaderText = "Nº Lugares";
            _seats.DataPropertyName = "Seats";
            _seats.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;
            _seats.Width = 120;
            this.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }
        public void SetColumns()
        {
            this.Columns.Add(_description);
            this.Columns.Add(_seats);

        }
    }
}
